package com.code.AZPlan.model.po;

import com.code.commons.model.po.BasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * AZ计划余额信息即矿池的具体信息（个人动态收益树结构也通过它生成）PO及持久层对象
 *
 * @author tangyifei
 * @since 2019年12月31日13:56:59
 */
@ApiModel("AZ计划个人余额信息即矿池的具体信息（个人动态收益树结构也通过它生成）PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@Table(name = "az_plan_balance")
public class AZPlanBalance extends BasePO<String> {

    private static final long serialVersionUID = -7491215402569546437L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "用户主键", example = "1")
    @NotBlank(message = "用户主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "当前用户的推荐人主键（上级）", example = "1")
    @NotBlank(message = "当前用户的推荐人主键（上级）不能为空")
    @Length(min = 1, max = 64)
    private String userParentId;

    @ApiModelProperty(value = "自动获得的USD金额（矿池大小）", example = "2000USD")
    @NotNull(message = "自动获得的USD金额（矿池大小）不能为空")
    private BigDecimal orePool;

    @ApiModelProperty(value = "累计入金", example = "7000USDT")
    @NotNull(message = "累计入金不能为空")
    private BigDecimal totalEntryMoney;

    @ApiModelProperty(value = "个人累计静态收益", example = "7000USDT")
    @NotNull(message = "个人累计静态收益不能为空")
    private BigDecimal totalStaticIncomeAmount;

    @ApiModelProperty(value = "个人累计的动态收益", example = "7000USDT")
    @NotNull(message = "个人累计的动态收益不能为空")
    private BigDecimal totalDynamicIncomeAmount;

    @ApiModelProperty(value = "0 未充值  1已充值（比如得到2000usd）2已释放完(比如已释放完2000usd)  3进入第二轮推荐  4第二轮已释放完并成为V1用户（比如第二轮的2000usd已释放完）后面待续", example = "1")
    private Integer azPlanStatus;

    @ApiModelProperty(value = "复投状态（1复投 0未复投）", example = "1")
    private Integer doubleThrowState;

    @ApiModelProperty(value = "当前用户的VIP级别", example = "V0")
    @NotBlank(message = "当前用户的VIP级别不能为空")
    private String userVipLevel;

    @ApiModelProperty(value = "用户的级别（如果当前用户级别为2，那么它的上级的级别为1，它下级的级别为3，以此类推）", example = "0")
    @NotNull(message = "用户的级别（如果当前用户级别为2，那么它的上级的级别为1，它下级的级别为3，以此类推）不能为空")
    private Integer userLevel;

    @ApiModelProperty(value = "版本号", example = "0")
    @NotNull(message = "版本号不能为空")
    private Integer version;

    @ApiModelProperty(value = "投资时间", example = "")
    private Date investTime;

}
